import {memberList} from '../../../request/api'

const state = {
    memberlist : []
}

const getters = {
    getMemberList(state){
        return state.memberlist
    }
}
 
const mutations = {
    REQ_LIST(state,payload){
        state.memberlist = payload
    }
}

const actions = {
    memberListAction({commit}){
        memberList()
        .then(res=>{
            console.log(res,'会员管理列表');
            if(res.code == 200){
                commit('REQ_LIST',res.list)
            }
        })
    }
}

export default{
    state,
    getters,
    mutations,
    actions,
    namespaced:true
}